<?php

class IndexController extends Plugin {

    public function __construct() {
        parent::__construct();
    }

    /*
     * weixin
     */
    public function IndexAction() {

        $signature = $thi->input->get("signature");
        $timestamp = $thi->input->get("timestamp");
        $nonce = $thi->input->get("nonce");

        $token = FN_TOKEN;
        $tmpArr = array($token, $timestamp, $nonce);
        sort($tmpArr, FN_SORT_STRING);
        $tmpStr = implode( $tmpArr );
        $tmpStr = sha1( $tmpStr );

        if( $tmpStr == $signature ){
            $this->_todo();
        }else{
            exit('此接口仅用于微信调用');
        }

    }

}